-- GENERATED SPELL FOR [Bone Crawler] --


function spell0_21849(pUnit, Event) --@Bore,n/a--
pUnit:FullCastSpellOnTarget(32738,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21849', 20000, 1)
end

function spell1_21849(pUnit, Event) --@Poison,n/a--
pUnit:FullCastSpellOnTarget(31747,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21849', 2000, 1)
end

function Sorts_21849(pUnit, Event)
local choix_sorts_21849 = math.random(0, 1)
if choix_sorts_21849 == 0 then
pUnit:RegisterEvent('spell0_21849', 1, 1)
end
if choix_sorts_21849 == 1 then
pUnit:RegisterEvent('spell1_21849', 1, 1)
end
end

function mob21849_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21849', math.random(1500, 3000), 1)
end

function mob21849_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21849_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21849_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21849, 1, 'mob21849_Action')
RegisterUnitEvent(21849, 2, 'mob21849_Leave')
RegisterUnitEvent(21849, 3, 'mob21849_Kill')
RegisterUnitEvent(21849, 4, 'mob21849_Die')
